﻿/*-----------------------------------------------
// Copyright (C) 2020 钟平上  版权所有。
// 文件名称：    Person
// 功能描述：    Person 类
// 创建标识：    Shang 2021/3/19 星期五 17:05:28
// 修改标识：    Shang 2021/3/19 星期五 17:05:28
// 修改描述:
-----------------------------------------------*/

using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Blog.Core.Model.Model
{

    /// <summary>
    /// 
    /// </summary>
    public abstract class Person
    {
        public int ID { get; set; }

        [Required]
        [StringLength(50)]
        [Display(Name = "Last Name")]
        public string LastName { get; set; }
        [Required]
        [StringLength(50, ErrorMessage = "First name cannot be longer than 50 characters.")]
        [Column("FirstName")]
        [Display(Name = "First Name")]
        public string FirstMidName { get; set; }

        [Display(Name = "Full Name")]
        public string FullName
        {
            get
            {
                return LastName + ", " + FirstMidName;
            }
        }
    }
}
